<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script>
    function $(id){
      return document.getElementById(id);
    }
    function changeCode(){
      $("codeImg").src = "/checkCode?"+Math.random();
    }
  </script>
</head>
<body>
    <form action="/user/login">
      用户名：<input type="text" name="userName"><br>
      密码：<input type="password" name="pwd"><br>
      验证码：<img src="/checkCode" id="codeImg">
      <a href="javascript:changeCode()">看不清楚，换一张</a>
      <br>
        请输入验证码：<input type="text" name="userCode"><br>
      <input type="submit" value="提交">
    </form>
</body>
</html>